import request from '@/utils/request'


// 查询学生管理列表
export function listStudent(query) {
  return request({
    url: '/student/student/list',
    method: 'get',
    params: query
  })
}
// 查询所有班级下所有学生管理列表
export function getClassAndStudents() {
  return request({
    url: '/student/class/list/classAndStudents',
    method: 'get'
  })
}

// 查询所有的校区学科班级列表
export function getCampusList() {
  return request({
    url: '/student/student/getCampusList',
    method: 'get'
  })
}

// 查询学生管理详细
export function getStudent(id) {
  return request({
    url: '/student/student/' + id,
    method: 'get'
  })
}

// 新增学生管理
export function addStudent(data) {
  return request({
    url: '/student/student',
    method: 'post',
    data: data
  })
}

// 修改学生管理
export function updateStudent(data) {
  return request({
    url: '/student/student',
    method: 'put',
    data: data
  })
}
// 学生留级改状态和班级
export function repeatedChange(data) {
  return request({
    url: '/student/student/repeatedChange',
    method: 'put',
    data: data
  })
}

// 批量修改学生状态
export function patchTypeUpdate(data) {
  return request({
    url: '/student/student/updateTypes',
    method: 'put',
    data: data
  })
}

// 删除学生管理
export function delStudent(id) {
  return request({
    url: '/student/student/' + id,
    method: 'delete'
  })
}

// 新增重点关注
export function addStudentFocus(data) {
  return request({
    url: '/student/student/addStudentFocus',
    method: 'post',
    data: data
  })
}

// 根据classId查询学生
export function listStudentByClassId(classId) {
  return request({
    url: '/student/student/lists/'+ classId,
    method: 'Get',
  })
}

// 学生报表查数据
export function getStudentsByFormData(data) {
  return request({
    url: '/student/student/list/getStudentsByFormData',
    method: 'Post',
    data: data
  })
}

// 学科报表查数据
export function getStudentsByMouth(data) {
  return request({
    url: '/student/student/list/getStudentsByMouth',
    method: 'Post',
    data: data
  })
}

